﻿using System;

public class JoyUtil
{
    // for delta time 
    private long lastTime = 0;
    public double DeltaTime()
    {
        long now = DateTime.Now.Ticks; // Changed this to ticks
        double dT = (now - lastTime); // / 1000
        lastTime = now;
        Console.WriteLine(dT);
        return dT;
    }

    // random range for int 
    private Random random = new Random();
    public int RandomRange(int begin, int end)
    {
        return random.Next(begin, end); //for ints
        //double rDouble = r.NextDouble()* range; //for doubles
    }
}